import {NgModule} from '@angular/core';
import {RouterModule, Routes} from '@angular/router';
import {DemoComponent} from './demo.component';
import {PrimeNgModule} from '../prime-ng.module';
import {CommonModule} from '@angular/common';
import {SharedModule} from '../shared/shared.module';
import {TableDemoComponent} from './component';
import {CarService} from './service/car.service';

const tableComp = [ TableDemoComponent ];


const routes: Routes = [{
  path : '',
  children : [
    { path: '', component: DemoComponent },
    // { path: 'layer', loadChildren: './angular2-layer/angular2-layer.module#Angular2LayerModule'},
  ]
}];

@NgModule({
  imports: [
    CommonModule,
    RouterModule,
    RouterModule.forChild(routes),
    PrimeNgModule,
    SharedModule
  ],
  declarations: [ DemoComponent, tableComp ],
  providers: [ CarService ]
})
export class DemoModule {}
